package com.example.monitoringsystem.currentUser;

import com.example.monitoringsystem.bean.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class StaticUser {
    public static User getCurrentUser() {
        Subject subject = SecurityUtils.getSubject ();
        User currentUser = (User) subject.getPrincipal ();
        return currentUser;
    }
}
